package com.ght.springboot;

import lombok.Data;

/**
 * Created by zhuzhixian on 17-7-5.
 */
@Data
public class BusinessException extends RuntimeException{
    final static int NormalBusiCode = 001;

    private Integer errorCode;

    public BusinessException(){}

    public BusinessException(Integer errorCode, String message){
        super(message);
    }

    public static BusinessException create(String message){
        return new BusinessException(NormalBusiCode, message);
    }
}
